package com.ethink.warehouse.facade.impl;

import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ethink.warehouse.api.MateProduceCodeFacade;
import com.ethink.warehouse.api.info.MateProduceCodeInfo;
import com.ethink.warehouse.api.request.MateProduceCodeAddRequest;
import com.ethink.warehouse.api.request.MateProduceCodeQueryRequest;
import com.ethink.warehouse.api.request.MateProduceCodeUpdateRequest;
import com.ethink.warehouse.api.response.MateProduceCodeAddResponse;
import com.ethink.warehouse.api.response.MateProduceCodeDeleteResponse;
import com.ethink.warehouse.api.response.MateProduceCodeUpdateResponse;
import com.ethink.warehouse.service.MateProduceCodeService;
import java.util.List;

/**
 * 商品生产批次号 Facade接口实现
 *
 * @author default
 * @date 2022-11-22
 */
@RestController
@Slf4j
@RequestMapping("warehouse-service/facade/v1/mateProduceCode")
public class MateProduceCodeFacadeImpl implements MateProduceCodeFacade {

    @Autowired
    private MateProduceCodeService mateProduceCodeService;

    @Override
    public Page<MateProduceCodeInfo> queryMateProduceCode(MateProduceCodeQueryRequest request) {
        return mateProduceCodeService.queryMateProduceCode(request);
    }

    @Override
    public MateProduceCodeInfo getMateProduceCodeById(Long mateProduceCodeId) {
        return mateProduceCodeService.getMateProduceCodeById(mateProduceCodeId);
    }

    @Override
    public List<MateProduceCodeInfo> listMateProduceCode(MateProduceCodeQueryRequest request) {
        return mateProduceCodeService.listMateProduceCode(request);
    }

    @Override
    public MateProduceCodeAddResponse addMateProduceCode(MateProduceCodeAddRequest request) {
        return mateProduceCodeService.addMateProduceCode(request);
    }

    @Override
    public MateProduceCodeUpdateResponse updateMateProduceCode(MateProduceCodeUpdateRequest request) {
        return mateProduceCodeService.updateMateProduceCode(request);
    }

    @Override
    public MateProduceCodeDeleteResponse deleteMateProduceCode(Long mateProduceCodeId) {
        return mateProduceCodeService.deleteMateProduceCode(mateProduceCodeId);
    }

    @Override
    public List<MateProduceCodeInfo> skuAndProduceCodeUnionQuery(List<MateProduceCodeQueryRequest> requestList) {
        return mateProduceCodeService.skuAndProduceCodeUnionQuery(requestList);
    }

}